package com.chris.datacnter.model;


import com.core.data.jdbc.zColumn;
import com.core.data.jdbc.zId;
import com.core.data.jdbc.zTable;
import com.fasterxml.jackson.annotation.JsonFormat;


import java.time.LocalDateTime;


@zTable(name ="dc_runtime")
public class DcRuntimeEo {
    @zId
    private int id;

    /**
     * 命名空间
     */
  private String ns;

    /**
     * 客户端自定义标识
     */
  private String tag;

    /**
     * 前端机器唯一标识
     */
    @zColumn(name = "sync_tag")
    private String syncTag;

    /**
     * 最大过期间隔(毫秒)
     */
    @zColumn(name = "sync_max_time")
    private long syncMaxTime;

    /**
     * 机器最后同步时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @zColumn(name = "last_sync_time")
    private LocalDateTime lastSyncTime;

    /**
     * 预期下线时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @zColumn(name = "off_time")
    private LocalDateTime offTime;


    /**
     * 前端机器运行状态<br />0 运行中  、 1 过期自动注销  、-1 强行注销下线
     */
    @zColumn(name = "code_state")
    private int codeState;

    @zColumn(name = "datacenter_id")
    private long datacenterId;

    @zColumn(name = "worker_id")
    private  long workerId;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }


    public String getSyncTag() {
        return syncTag;
    }

    public void setSyncTag(String syncTag) {
        this.syncTag = syncTag;
    }

    public long getSyncMaxTime() {
        return syncMaxTime;
    }

    public void setSyncMaxTime(long syncMaxTime) {
        this.syncMaxTime = syncMaxTime;
    }

    public LocalDateTime getLastSyncTime() {
        return lastSyncTime;
    }

    public void setLastSyncTime(LocalDateTime lastSyncTime) {
        this.lastSyncTime = lastSyncTime;
    }

    public LocalDateTime getOffTime() {
        return offTime;
    }

    public void setOffTime(LocalDateTime offTime) {
        this.offTime = offTime;
    }

    public int getCodeState() {
        return codeState;
    }

    public void setCodeState(int codeState) {
        this.codeState = codeState;
    }

    public long getDatacenterId() {
        return datacenterId;
    }

    public void setDatacenterId(long datacenterId) {
        this.datacenterId = datacenterId;
    }

    public long getWorkerId() {
        return workerId;
    }

    public void setWorkerId(long workerId) {
        this.workerId = workerId;
    }

    public String getNs() {
        return ns;
    }

    public void setNs(String ns) {
        this.ns = ns;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }
}
